.site-search {
    margin: auto;
    // padding: 0px 0px 0px 5px;

    @include media-breakpoint-up(md) {
        padding: 0px 30px;
        position: relative;
    }

    .input-icon {
        position: absolute;
        left: 30px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba($secondary, 0.3);
        border-right: 1px solid rgba($secondary, 0.1);
        padding-right: 0.8em;
        transition: color 0.2s ease-in-out;

        @include media-breakpoint-up(md) {
            left: 45px;
        }
    }

    .desktop {
        align-items: center;
    }

    .mobile {

        &.show {
            .dropdown-toggle {
                background: $white;
                color: $primary !important;
                border: 1px solid $border-color;
                border-bottom: 0;
                border-top: 0;
            }
        }

        .dropdown-toggle {
            border: 0;
            color: $text-color;
            background: none;
            line-height: 60px;
            margin-left: -1px;
            padding: 0 1rem;
            border-radius: 0;
            text-align: center;
            transition: background 0.2s, color 0.2s;

            i {
                font-size: 18px;
                line-height: 60px;
            }

            &:hover {
                background: $white;
                color: $primary;
            }
        }

        .form-control {
            background: $white;
            margin: 0;
        }

        .mobile-search-dropdown {
            text-align: left;
            width: 100%;
            min-width: none;
            background: $white;
            margin: 0;
            border: 0;
            border-radius: 0;
            padding: 15px;
        }
    }
}

.site-search-input {
    border-radius: 3px;
    height: 42px;
    border: none;
    background: darken($gray-bg, 10%);
    font-size: 0.9rem;
    color: $text-color;
    padding: 0 4.5em;
    transition: background 0.2s;
    box-shadow: none;

    &:focus {
        outline: 0px none;
        box-shadow: none;
        background: $white;
    }
}

.site-search-results {
    display: none;
    background: #fff;
    position: absolute;
    top: 40px;
    padding: 15px;
    // overflow-y: auto;
    left: 30px;
    right: 30px;
    box-shadow: $shadow-md;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    @include box-shadow(0px 3px 3px 0px rgba(0, 0, 0, 0.1));

    &::before {
        content: '';
        width: 90%;
        height: 1px;
        background-color: $border-color;
        position: absolute;
        top: -1px;
        left: 50%;
        transform-origin: center;
        transform: translateX(-50%) scaleX(0);
        animation: scaleIn 0.7s ease-in-out forwards;
    }

    @include media-breakpoint-down(md) {
        top: 132px;
        left: 0;
        right: 0;
        z-index: 1001;
    }

    .container-fluid {
        height: 100%;
        max-height: 100%;
        min-width: auto;
    }

    ul {
        padding: 0;
        list-style: none;
    }

    .results {
        padding-bottom: 30px;

        ul { margin-bottom: 20px; }

        li {
            margin-left: 15px;
            margin-bottom: 5px;
            border-bottom: 1px solid #eee;
            a {
                display: block;
                padding: 5px 0px;

                @include media-breakpoint-up(md) {
                    font-size: 1.6rem;
                }
            }
        }

    }

    .additional {
        li {
            margin: 0px 15px 15px 0px;
            display: inline-block;
            i {
                margin-right: 7px;
                vertical-align: middle;
            }
        }
    }

    .key {
        margin-left: 6px;
        padding: 2px 6px;
        background: #999;
        color: #fff;
    }
}

@keyframes scaleIn {
    to {
        transform: translateX(-50%) scaleX(1);
    }
}
